Attribute VB_Name = "ParseListView"
Public List As ListView

Public Function Setup_UserInformation_Columns(List As ListView)
    With List
        .ColumnHeaders.Add(, , "Username", 1300).Tag = "Username"
        .ColumnHeaders.Add(, , "Client", 700).Tag = "Client"
        .ColumnHeaders.Add(, , "Flags", 700).Tag = "Flags"
        .ColumnHeaders.Add(, , "Ping", 700).Tag = "Ping"
        .ColumnHeaders.Add(, , "Sock", 700).Tag = "Sock"
        
        .ColumnHeaders(1).Alignment = lvwColumnLeft
        
    End With
End Function

Public Function AddUser(Username As String, Optional Client As String, Optional Flags As String, Optional Ping As String, Optional socket As String)
    If IsOnline(List, Username) = True Then
                    Debug.Print "That Account is already in use"
                Else
                    With List
                        With .ListItems
                            With .Add(, , Username) 'username
                             .ListSubItems.Add , , Client 'client
                             .ListSubItems.Add , , Flags 'flags
                             .ListSubItems.Add , , Ping 'ping
                             .ListSubItems.Add , , socket 'socket
                             
                            End With
                        End With
                    End With
                End If
        
End Function

Public Function FindUser(Username As String) As String
    Dim i As Integer
        For i = 1 To List.ListItems.Count
            If List.ListItems.Item(i) = Username Then
                Name$ = List.ListItems.Item(i) & Chr(0)
                Client$ = List.ListItems.Item(i).ListSubItems(1) & Chr(0)
                flag$ = List.ListItems.Item(i).ListSubItems(2) & Chr(0)
                Ping$ = List.ListItems.Item(i).ListSubItems(3) & Chr(0)
                socket$ = List.ListItems.Item(i).ListSubItems(4) & Chr(0)
                FindUser = Name & Client & flag & Ping & socket
                
                Exit Function
            Else
                FindUser = "Not Found"
                
            End If
            
        Next i
        
End Function



